Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Apparently the trick is best described as "scope"...

- If the text is centered in a wide control, such as a Label, then that centering is utterly and completely ignored on rendering in a browser, despite the fact that text-align:center clearly appears on the style for that control, and it quite clearly shows up centered in Designer.
- If, however, one sets the control to align left, then applies text-align:center to the paragraph *around* the control, then it does in fact render centered in the browser, even though the content of the control does NOT render centered in Designer.
- Apparently the width of the control is irrelevant when rendering (it doesn't even set a lower bound before scroll bars appear; just checked), it's only the width of the computed content that matters, and one is supposed to "just know" that if the borders of the control are centered in Designer then the (run time) text will be centered when rendered, even though the content in Designer is all lopsided, the borders of a control are only visible when it's selected, and any number of widths of controls may be present at any given time.
- So this:

<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
style="text-align:center">
<xp:label value="${javascript:database.getTitle()}"
style="width:26.0%;font-family:Arial;font-size:14pt;font-weight:bold;text-align:right"
id="AppTitle">
</xp:label>
<xp:br></xp:br>
<xp:label value="${javascript:'Ticket #'}"
style="width:39.0%;height:30.0px;font-family:Arial;font-size:11pt;font-weight:bold;text-align:left"
id="dspTrackerID">
</xp:label>
<xp:div style="text-align:left">
</xp:div><xp:div style="text-align:left"></xp:div></xp:view>

shows the first Label's contents align right and the second Label's contents align left, in Designer, and unless one of the controls is selected it's impossible to tell where either control's borders are. Yet in the browser all content is centered.
- Perhaps it's just me, but this seems more than a little counter-intuitive. What's the point of having a width on a control if it's utterly ignored? Same with alignment on a control? Same with showing control content alignment in DDE? It's confusing at best, to someone who's used hand-crafted style sheet layout for years and years.

- Just to end on a positive note, I do have to say that having the Source tab in DDE is a real bonus. If nothing else I can paste in what's in Designer, as above, so others will know unequivocally what's on my screen, and perhaps be able to make suggestions. It's also considerably simpler to edit properties in the Source tab than to click through a gajillion property pages to do the same thing. Very spiffy...


Feedback response number WEBB7SURUF created by ~Holly Zekhipisonnivu on 06/09/2009

I thought XPages were "visual" desi... (~Holly Zekhipis... 9.Jun.09)
. . Apparently the trick is best descri... (~Holly Zekhipis... 9.Jun.09)
. . Apparently DDE is NOT a visual desi... (~Holly Zekhipis... 11.Jun.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS